<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh" lang="zh" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><?php echo $word?></title>
</head>
<body>
<?php
$this->render('header');
if ($login) {
    echo '<a href="./">生词</a>&nbsp;';
    echo '<a href="?list=done">熟词</a>&nbsp;';
}
    echo '<a href="?list=recently">最近查询</a>';
    echo '<br /><h2>',$word,'</h2>';
if ($login) {
?>
<?php
}
?>
<?php
if ($define) {
    if ($pronounce) {
        echo '[';
        printer($pronounce,'plain','html');
        echo ']<br /><br />';
    }
    printer($define,'plain','html');
    if (@count($examples)>0) {
        echo '<br /><h4>例句:</h4>';
        foreach ($examples as $e) {
            printer($e,'plain','html');
            echo '<br />';
        }
    }
} else {
    echo 'null<br />';
}
?>
<br />
<?php 
if ($define && $login) {
    ?>
    <form method="POST" action="./?w=<?php echo $word?>">
    <input type="hidden" name="word" value="<?php echo $word?>" />
    <?php
    if ($existed) {
    ?>
    <input type="hidden" name="action" value="done" />
    <input type="submit" name="smt" value="加入熟词" />
    <?php
    } else {
    ?>
    <input type="hidden" name="action" value="new" />
    <input type="submit" name="smt" value="加入生词" />
    <?php
    }
?>
    </form>
<?php
}
$this->render('footer');
?>
</body>
</html>
